import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
  plugins: [
    vue(),
  ],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  },
  server: {
    port: 13141,
    host: '0.0.0.0',
    // 设置反向代理，跨域
    proxy: {
      '/api': {
        // 后台地址
        target: 'http://10.192.32.102:18999',
        changeOrigin: true,
        // rewrite: pathurl => pathurl.replace(/^\/api/, '/api')
      },
    }
  }
})


